package com.cyt.work.wb.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 维保模块-报废表实体类
 *
 * @author shengQiang Yu
 * @date 2019-11-28 9:28:18
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_wb_scrap")
public class WbScrap implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 应用id
     */ 
	@Column(name = "apply_id")
	private String applyId;

	/**
     * 设备ID
     */ 
	@Column(name = "device_id")
	private String deviceId;

	/**
     * 设备名称
     */ 
	@Column(name = "device_name")
	private String deviceName;

	/**
     * 设备编号
     */ 
	@Column(name = "device_num")
	private String deviceNum;

	/**
     * 设备型号
     */ 
	@Column(name = "device_model")
	private String deviceModel;

	/**
     * 报废原因
     */ 
	@Column(name = "scrap_reason")
	private String scrapReason;

	/**
     * 处理方式
     */ 
	@Column(name = "dispose")
	private String dispose;

	/**
     * 删除标识
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author shengQiang Yu
	 * @date 2019-11-28 9:28:18
	 */
	public WbScrap(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}